import { ref, provide, inject } from "vue";
import { getUuid, isEmpty, ktlbus } from "@/utils";

export default{
	provide(){
		return {
			_page_group_routerid: this._page_group_routerid,
			_page_kbus: this._page_kbus
		}
	},
	data(){
		
		// 页面标记 pageGroup
		let _page_group_routerid = inject("_page_group_routerid")
		let _page_kbus = inject("_page_kbus")
		if(isEmpty(_page_group_routerid)){
			_page_group_routerid = getUuid()
			_page_kbus = ktlbus.init()
			
			// _page_kbus.subscribe("")
			
			// console.log('_page_group_routerid', _page_group_routerid);
			
		}
		
		return {
			_page_group_routerid,
			_page_kbus
		}
	},
	mounted(){
		
	}
}